// main.cpp
#include"graph.h"

using namespace std;

int main()
{
    cout << "请输入顶点数和边数:" << endl;
    int n, e;
    cin >> n >> e;
    int array[MAXSIZE];
    for ( int i = 0; i < n; i ++){
    	array[i] = i;
    }
    cout << "请指定数据存放结构:" << endl;
    char c;
    cin >> c;
    if (c == 'l'){
    	ALGraph<int> graph(array, n, e);
    	graph.listVertexes();
    	graph.listEdges();
    }
    else if(c == 'm'){
	MGraph<int> graph(array, n ,e);
        graph.listVertexes();
        graph.listEdges();
    }
    else if ( e < (n * n / 2) ){
        ALGraph<int> graph(array, n, e);
        graph.listVertexes();
        graph.listEdges();
    }
    else{
        MGraph<int> graph(array, n ,e);
        graph.listVertexes();
        graph.listEdges();
    }
    return 0;
}

